;Inserts title block (attribs) and Xrefs static title info.  (attribs in CORPTTLAT.DWG, static text in ??????TC.DWG, ??????=6 chars of default dir)
;
;	AUTHOR: HENRY C. FRANCIS
;		425 N. ASHE ST.
;		SOUTHERN PINES, NC 28387
;              
;		All rights reserved without prejudice.
;
;	Copyright:	2-16-96
;	Edited:		2-16-96
;
(defun c:ttlb ( / dpfx slfx dwnm slnm pt1 inss1)
  (setvar "attdia" 1)
  (setvar "cmdecho" 0)
  (c:svlayr)
  (if dimscl nil (load"dimscl"))
  (dimscl)
  (setq mjrg "G"
        llt "-"
        prod "TTLB"
        colr "1"
        modf "IDEN"
  );setq
  (c:mklayr)
  (setq dpfx (getvar"dwgprefix")
        slfx (strlen dpfx)
        dwnm (getvar"dwgname")
        slnm (strlen dwnm)
        dwgpfx
          (if(eq(substr dwnm 1 3)(substr dpfx 1 3))
            (substr dwnm (1+ slfx) 1)
            (substr dwnm 1 1)
          );if
        nxnxr (strcat (substr dpfx 4 6) "TC")
  );setq
  (progn
    (setq pt1 (list 0 0 0))             ;(getpoint "\nInsertion Point "))
    (setq pt1 (list(car pt1)(cadr pt1)(* dimsc 1001)))
    (setq inss1 dimsc)
    (if (findfile (STRCAT nxnxr ".dwg"))
      (command ".XREF" "a" nxnxr pt1 inss1 inss1 "0")
    );if
    (if s_ttlb
      (cond
        ((equal s_ttlb T)(command ".insert" "CORPTTBAT" pt1 inss1 inss1 "0"))
        ((equal s_ttlb "prtrt")(command ".insert" "cdmttb8p" pt1 inss1 inss1 "0"))
        ((equal s_ttlb "lndscp")(command ".insert" "cdmttb8l" pt1 inss1 inss1 "0"))
      )
      (command ".insert" "corpttlat" pt1 inss1 inss1 "0")
    )
  );progn
  (c:rslayr)
  (setvar "attdia" 0)
  (princ)
);defun
